import java.util.Scanner;
class NotTriangle extends Exception{
    double a,b,c;
    public NotTriangle(double a,double b,double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }
    public String toString(){
        return a +" "+ b + " " + c +" "+"不是三角形";
    }
}
public class TestTriangle {
    public static boolean isTriangle(double a,double b,double c){
        return a + b > c;
    }

    public static void main(String[] args) {
        System.out.println("请输入三角形三边");
        Scanner read = new Scanner(System.in);
        double[] length = new double[3];
        for(int i = 0; i < 3; i++)
            length[i] = read.nextDouble();
        try{
            if(isTriangle(length[0],length[1],length[2]))
                System.out.println(length[0]+" "+length[1]+" "+length[2]+" "+"是三角形");
            else
                throw new NotTriangle(length[0],length[1],length[2]);
        }
        catch (NotTriangle e){
            System.out.println(e.toString());
        }
    }
}

